package cn.wolfcode.service;

import cn.wolfcode.domain.OperateIntergralVo;
import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;

/**
 * @author BAI
 */
@LocalTCC
public interface IUsableIntegralService {

    @TwoPhaseBusinessAction(useTCCFence = true ,name = "tryIntegralPay",commitMethod = "commitIntegralPay",rollbackMethod = "rollbackIntegralPay")
    String tryIntegralPay(BusinessActionContext actionContext,OperateIntergralVo vo);
    void commitIntegralPay(BusinessActionContext actionContext);
    void rollbackIntegralPay(BusinessActionContext actionContext);

    String integralPay(OperateIntergralVo vo);

    void integralRefund(OperateIntergralVo vo);
}
